package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.NewsContent;
import cn.wolfcode.trip.base.domain.NewsPage;
import cn.wolfcode.trip.base.domain.NumBrowse;
import cn.wolfcode.trip.base.query.CollectQueryObject;
import cn.wolfcode.trip.base.query.NewsPageQueryObject;
import cn.wolfcode.trip.base.query.SearchQueryObject;
import com.github.pagehelper.PageInfo;

import javax.print.attribute.standard.NumberUp;
import java.util.List;

public interface INewsPageService {
    /**
     * 新增和编辑
     * @param newsPage
     */
    void saveOrUpdate(NewsPage newsPage);

    PageInfo query(NewsPageQueryObject qo);

    NewsContent selectNewContentByNewsId(Long newsId);


    /**
     * 通过关键字查询日报
     * @param qo
     * @return
     */
    PageInfo searchQuery(SearchQueryObject qo);

    /**
     * 根据关键字查询该日报的总数
     * @param keyword
     * @return
     */
    int selectCountByKeyword(String keyword);

    /**
     * 查询用户收藏的日报
     * @param qo
     * @return
     */
    PageInfo selectForCollect(CollectQueryObject qo);

    /**
     * App高查
     * @param qo
     * @return
     */
    PageInfo queryApp(NewsPageQueryObject qo);
    /**
     * App查询日报内容
     * @param newsId
     * @return
     */
    NewsPage selectNewsContentById(Long newsId);

    /**
     * 保存浏览量
     * @param num
     * @return
     */
    int save(NumBrowse num);

    int selectScanNumber(Long id);
}
